package com.baobao_jk.tutorialmod.items;

import com.baobao_jk.tutorialmod.Main;
import com.baobao_jk.tutorialmod.init.ModItems;
import com.baobao_jk.tutorialmod.util.IHasModel;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class ItemBase extends Item implements IHasModel{ //继承 Minecraft Item 类 然后连接接口 IHasModel

    public ItemBase(String name) {
        setUnlocalizedName(name); //未本地化的名称
        setRegistryName(name); //注册的名称
        setCreativeTab(Main.tutorialtab); //标签栏，MATERIALS 是Minecraft原版里面的杂项Tab
        ModItems.ITEMS.add(this); //添加item注册
    }

    @Override
    public void registerModels() {
        Main.proxy.registerItemRenderer(this, 0, "inventory"); //代理注册
    }

}
